package com.jiyun.statistical.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author author
 * @since 2025-02-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("driver_performance")
public class DriverPerformance implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 司机ID
     */
    @TableId(value = "driver_id", type = IdType.AUTO)
    private String driverId;

    /**
     * 司机姓名
     */
    private String driverName;

    /**
     * 手机号码
     */
    private String phoneNumber;

    /**
     * 运单完成数量
     */
    private Integer completedOrders;

    /**
     * 按时完成数量
     */
    private Integer onTimeOrders;

    /**
     * 准时率
     */
    private BigDecimal onTimeRate;

    /**
     * 异常运单数
     */
    private Integer abnormalOrders;

    /**
     * 异常率
     */
    private BigDecimal abnormalRate;

    /**
     * 里程合计
     */
    private BigDecimal totalMileage;

    /**
     * 日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date performanceTime;

    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date performanceTimeStart;

    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date performanceTimeEnd;


}
